package org.hhchat.others.microsoft;

import java.util.*;

/**
 * Created by HMH on 2017/3/31.
 */
public class microsoft04 {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        while(scanner.hasNext()){
            String str = scanner.nextLine();
            char[] chars = str.toCharArray();
            Stack<Character> characters = new Stack<>();
            List<Character> list = new ArrayList<>();
            for(int i=0;i<str.length();i++) {
                if (str.charAt(i) == ')' && characters.size() > 0 && characters.peek() == '(') {
                    characters.pop();
                    while(list.get(list.size()-1)=='0'){
                        list.remove(list.size() - 1);
                    }
                    list.remove(list.size() - 1);
                    list.add('0');
                }
                else {
                    characters.push(str.charAt(i));
                    list.add(str.charAt(i));
                    }
            }
            int[] index = new int[list.size()+1];
            index[0]=0;
            int counter=0;
            for(int i=0;i<list.size();i++) {
                if (list.get(i) != '0') {
                    index[++counter]=i;
                }
            }
            int count=1;

            for(int i=1;i<=counter;i++) {
                count*=(index[i]-index[i-1]+1);
            }
            System.out.print(counter+" ");
            System.out.println(count);
        }
    }
}
